#[non_exhaustive]pub struct PythonPackage {
pub name: String,
pub uri: String,
pub package_name: String,
pub version: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
/* private fields */
}Expand description
PythonPackage represents a python artifact.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. registry_location, project_id, repository_name and python_package
forms a unique package
name:projects/<project_id>/locations/<location>/repository/<repository_name>/pythonPackages/<python_package>.
For example,
“projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/
python_package:1.0.0”,
where “us-west4” is the registry_location, “test-project” is the
project_id, “test-repo” is the repository_name and
python_package:1.0.0“ is the python package.
uri: StringRequired. URL to access the package. Example: us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
package_name: StringPackage for the artifact.
version: StringVersion of this package.
create_time: Option<Timestamp>Output only. Time the package was created.
update_time: Option<Timestamp>Output only. Time the package was updated.
Implementations§
Source§impl PythonPackage
impl PythonPackage
pub fn new() -> Self
Sourcepub fn set_package_name<T: Into<String>>(self, v: T) -> Self
pub fn set_package_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_version<T: Into<String>>(self, v: T) -> Self
pub fn set_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = PythonPackage::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = PythonPackage::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = PythonPackage::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = PythonPackage::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = PythonPackage::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = PythonPackage::new().set_or_clear_update_time(None::<Timestamp>);Trait Implementations§
Source§impl Clone for PythonPackage
impl Clone for PythonPackage
Source§fn clone(&self) -> PythonPackage
fn clone(&self) -> PythonPackage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more